var number = function (busStops) {  
  return busStops.map(x=>x[0]-x[1]).reduce((a,b)=>a+b)
}
var number2 = function (busStops) {  
  return busStops.reduce((x,[a,b])=>x+a-b,0)
}
console.log(number2([[10,0],[3,5],[5,8]]))